//
//  MLITopView.m
//  BaseProject
//
//  Created by mac on 2021/1/11.
//  Copyright © 2021 王洋. All rights reserved.
//

#import "MLITopView.h"

@interface MLITopView ()
@property(nonatomic,strong)UIImageView *bgIV;
@property(nonatomic,strong)UIImageView *contentIV;
@end

@implementation MLITopView
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self bgIV];
        self.height = self.contentIV.bottom + 10*ADAPTER_WIDTH;
    }
    return self;
}
#pragma mark - lazy懒加载
- (UIImageView *)bgIV
{
    if (!_bgIV) {
        UIImageView *iv = [[UIImageView alloc]init];
        [self addSubview:iv];
        iv.image = [UIImage getPNGimageInBundleWithName:@"MLI_Top_bg"];
        iv.frame = CGRectMake(0, 0, self.width, 583*ADAPTER_WIDTH);
        _bgIV = iv;
    }
    return _bgIV;
}
- (UIImageView *)contentIV
{
    if (!_contentIV) {
        UIImageView *iv = [[UIImageView alloc]init];
        [self addSubview:iv];
        iv.image = [UIImage getPNGimageInBundleWithName:@"MLI_Top_content"];
        iv.frame = CGRectMake(0, 416*ADAPTER_WIDTH, self.width, 554*ADAPTER_WIDTH);
        _contentIV = iv;
    }
    return _contentIV;
}
@end
